<template>
  <page-wrap :show-top="showTop" title="下载" hideTab>
    <view>
      <!-- <web-view style="width:80%" src="https://m5.yl1001.com/marketing/downloadApp/index.html#/index"></web-view> -->
      <view class="logo">
        <image src="https://upload.yl1001.com/upload/images/view?file=U-99RkIrKlHn6CQiKLfg=PjMovDhtDy6ve6z22CnKufxKgt33mBz7dJmDOdHl.png"></image>
        <view>请复制以下链接前往浏览器打开</view>
      </view>
      <view class="address">
        <!-- <text selectable="true">{{text}}</text> -->
        <input class="weui-input" v-model="text" disabled placeholder="" />
      </view>
      <button class="copy" @click="copyText" :data-item='text'>点击复制</button>
    </view>
  </page-wrap>
</template>

<script>
export default {
  data() {
    return {
      text: "https://a.app.qq.com/o/simple.jsp?pkgname=com.elan.activity&channel=0002160650432d595942&fromcase=60001"
    }
  },
  methods: {
    copyText(e) {
      let item = e.currentTarget.dataset.item;
      uni.setClipboardData({
        data: item,
        success: function (res) {
          uni.showToast({
            title: '复制成功',
            icon: "success"
          });
        }
      });
    }
  }
}
</script>


<style lang="scss">
.logo {
  margin: 400rpx auto 0;
  font-size: 30rpx;
  image {
    margin: 0 auto 40rpx;
    width: 272rpx;
    height: 200rpx;
  }
  view {
    text-align: center;
    margin-top: 220rpx;
    color: #a1a1a1;
  }
}
.address {
  margin: 0 auto;
  word-break: break-all;
  width: 80%;
  padding: 20rpx;
}
.copy {
  color: #02a7f0;
  width: 200rpx;
  margin: 10rpx auto;
  border: none;
  font-size: 32rpx;
}
.weui-input {
  border: 1px solid #e0dddd;
  border-radius: 8rpx;
  height: 78rpx;
  padding: 0 28rpx;
}
</style>
